Add retention sweep metrics for cycle duration, rows deleted, and consecutive failures - #5831
Merged
Conversation
warwickschroeder
left a comment
Contributor
There was a problem hiding this comment.
Does docs/telemetry.md need updating?
…secutive failures Persisters publishing onto a host's already-registered meter cannot reference the host assembly, so meter names are extracted into a shared ServiceControlMeters constants class. Cycles interrupted by cancellation are excluded from measurements, as a clean shutdown is not a failure worth alerting on.
rbev
approved these changes
Aug 31, 2026
| /// One pass of the retention sweep. A pass interrupted by shutdown is not a measurement of | ||
| /// anything, so a cancelled cycle records neither a duration nor a failure. | ||
| /// </summary> | ||
| public sealed class RetentionCycleMetrics : IDisposable |
Contributor
There was a problem hiding this comment.
Should these classes be in separate files, and possibly in their own namespace/folder?
| this.cancellationToken = cancellationToken; | ||
| } | ||
|
|
||
| public void Complete() => completed = true; |
Contributor
There was a problem hiding this comment.
I know it's probably not material but shouldn't this also freeze the timer in case there is time between the Complete() and Dispose()?
Member
Author
There was a problem hiding this comment.
Good call, done. Complete() stops the stopwatch and Dispose() records the frozen value.
Covers the three metrics (cycle duration, rows deleted, consecutive failures), their tags, example PromQL queries, and guidance on reading the shapes — including what a climbing consecutive-failures gauge means for body store permissions and why passes are isolated from one another.
…d propagate body-delete failures
johnsimons
force-pushed
the
john/retention_metrics
branch
from
August 31, 2026 05:28
31d5150 to
877454b
Compare
warwickschroeder
approved these changes
Aug 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.